# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pathzuzu
pkgver=64.4f4533c
pkgrel=2
pkgdesc='Checks for PATH substitution vulnerabilities and logs the commands executed by the vulnerable executables.'
groups=('blackarch' 'blackarch-exploitation')
arch=('any')
url='https://github.com/ShotokanZH/Pa-th-zuzu'
license=('GPL2')
depends=('bash')
makedepends=('git')
source=("$pkgname::git+https://github.com/ShotokanZH/Pa-th-zuzu.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/$pkgname/" pathzuzu.sh.md5 version.txt
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

